Added customisable regexp for error tests, to distinguish between different 'user' error responses.

Various tidy ups and enhancements
Testing new endpoint URLs
Merge origin/master