Removed build-essential from package uninstall list.
Reordered creation of files.