Fix for NULL pointer read
When closing an input file, some RISC OS specific code was trying to read the file attributes via OS_File, except it also did this when the input is stdin. Move the call down to be after the stdin check so we have a valid filename.