simplify copying of python scripts for esconfig
use loop for /etc/modules checking
de-duplicate / make function for checking if dir exists and deleting.
send OPT_FLAGS directly to make - no need to create a patchfile/patch etc
we can do a single chown for all roms/esconfig files
de-duplicate mame4all folder creation / ownership (chown rather than making files world writable)
use chown $user:$user rather than chown/chgrp
no need to keep switching around default gcc versions - just pass the correct environment variable directly to make/configure
sed in place for advancemame changes
no need to split sed onto multiple lines (and it makes it no more readable in this case imho)
Merge pull request #359 from exobuzz/de-duplication

De duplication