Unlink import file when finished

fixes #2483
- Update db import version (in case it doesn't exist)
- Properly unlink file after import or error