Feature/iotcore 107 error conditions

Change the error objects to use instances of Error instead of anonymous objects (following suggested Node Best Practices).

Add tests for cases where the information needed for the validation is not found.