were you thinking that this would generate a tempfile in that directory?  If so, that would mean doing `tempfile.mkstemp(dir=filename)[1]`