Fix for issue #2 and exec refactor

Fix for https://github.com/grahamgilbert/puppet-dockutil/issues/2

Also included an improvement for the actual Dock restart. Now, it will restart the Dock only once, instead of once per change.