check if file exists before using getimagesize()
fix code style
Merge pull request #628 from Zeromax/fix-toolbox-fileexists

[tng] ToolboxFile should check if the file exists.