to make sure rename() properly works, make a tempfile in the same directory