If you're .close()ing and then immediately .unlink()ing a NamedTemporaryFile,
why not simply let NamedTemporaryFile do its job?