fixing problems with path calculations in init and install scripts