Fix call to File.createTempFile with non-path string

/cc @etorreborre