Merge pull request #10 from mjschranz/b862786

Bug 862786 - Created npmignore file to prevent unwanted files being packaged with npm
Bug 862461 - Add in Mongo connection error handling.
Add middleware checking if Mongo Connection is active.
Restructure when connection was made for easier passing around of object