Added publicMessage Method

This pull request makes the following modifications:

- Rename folder "tests" to "test" to be mocha compatible.
- Adds "publicMessage" method and the corresponding unit tests.
- Assign the inner error status code if there is any. If there isn't assign 500 as default
- Makes some minor format changes so the module became JSHint compliant.