Go knows what I was thinking, I was applying read and write locks on
two seperate locks. Which is not going to work. So changed the Lock
class to take lockType to the lock() function rather than its construct.

Also added pthread_mutexattr_t initilization to throw errors on double
locks. With pthread_rwlockattr_t changed the default option to be shared
instead.

You cant combine two locks to respect each other, and the test was
looking for this hense why the random errors. This change fixes #12