Fixes issues #3 and #4

Function can now handle a null being returned from ‘getFile’.

Tested and working on PyCharm.