Get defensive about opening files which may not exist.

I had an issue with the [MuraSentry](https://github.com/al3x-edge/MuraSentry) plugin, where temp files were not found and thus caused an error with ```fileOpen```. So I added a little defensive code via ```fileExists``` and an ```arrayLen``` check on ```fileArray```, which solves the problem.