Cherry pick commits from jippi/puppet-php

This PR cherry picks commits mentioned in #32 from https://github.com/jippi/puppet-php in a sensible way for our fork.