Wrapped sync.Mutex with Mutex, a type with a CriticalSection method; added tests for copyHeader()