Fix issue with running install only from certain location

Add abspath function to script and also to standard environment.