tests: some fixes (missing import, delete temp file only if needed)
tests: refactored test_md5