tmpfile is a path, not just a file. Would have to split path, add dot to filename, join path ... yuck