Clean up temp directory after import. Fixes #1395.