replaced system() calls with FileUtils.* methods

This also makes that `mv: cannot stat '/ho..` is not shown in the test :)