Fixes issues #3 and #4

Function can now handle a null being returned from ‘getFile’.
Merge pull request #5 from lolletsoc/master

Fixes issues #3 and #4