Tom/Eduardo - a bunch of fixes.

Moving the requires to stop mongo gem being required before we install it.
Removing unused function.
Fixing init script which was missing variables
Putting init script before the config file.
Adding tests to cover some of the above.