add portable methods for cleaning up temp files