replacing redundant code by _tmp_filename() function
string type testing via isinstance(s, basestring)
Merge branch 'master' into modelloc
misspelling
changed name of return data -> file_content (more descriptive)
added a few comments to make it clear