1130637: Correct call to os.path.isfile

The unit tests missed this issue because by default Mock does not
verify the method signatures of the calls to the mock object are valid.
The solution to this problem is to use Mock's autospec functionality.
See http://www.voidspace.org.uk/python/mock/helpers.html#auto-speccing