Reviewing pup-3710, we opted to backport one change (see https://github.com/puppetlabs/puppet/pull/4015), but Branan Riley noted that there is a race condition in the original pe-puppet logic. Rather than check for the path existing and then chdir'ing to it, it should chdir and catch the exception.
Even better, it shouldn't chdir all over the place.