Updated many parts of the script to Valve's code

Everything raid/lvm related hasn't been changed, everything else has been updated to what is in the latest post_install.sh from Valve.
Merge pull request #54 from sharkwouter/patch-10

Updated many parts of the script to Valve's code