Updated API calls and unit tests

Tested against iRODS 4.0.3