tests: Convert tests for overwriting files to Autotest framework.