use obspy's version of NamedTemporyFile for #592