Added support for puppet 3.x

Puppet has changed the config print syntax, as a result the default statefile location is inaccurate. This pull request polls the version of puppet first and queries statedir using the appropriate command.