Made a few changes to allow for easier automated building, particularly
when building/installing in a none standard directory.