fix issue 352 - require 'file' to be a string
Added failing test for #352
Merge branch 'master' into issue352