fixed a small bug in case the install location of a pkg ends with /
removed unneccesary whitespaces