Made file helper functions return the PHP function call results.
Updated comments.
Merge pull request #1830 from ahukkanen/file_helper_tweak

File helper tweak
https://hackerone.com/reports/5831