Fixed bug with requiring package.json

If you are using with another module it errors out
Fixed small bug in test