don't use hard-coded paths in package scripts

This should be merged to master sometime soon. There's a pull-request by @MajorBreakfast.