Move pe-install script from inline to own file in bin/