Add tests, refactor the main class

Heya,

I basically wrote a few examples (tests), and here is the result:

[![Build Status](https://travis-ci.org/willdurand/puppet-upstart.png?branch=master)](https://travis-ci.org/willdurand/puppet-upstart)

I refactored some parts considered bad practices now.

Could you please tag a version, and generate a package that you would publish on the forge?

Thank you!

Cheers,
William