Install script fixes/improvements

A couple of fixes and improvements to the installation script.

These changes were tested on F18 and Ubuntu 12.04LTS. Further testing is welcome.