Update circleci to go version 1.13 and fix associated errors

Issue #24 resolved
Scott Barnard created an issue

Circleci uses go version 1.12 for building and testing. Using go 1.13 causes some tests to fail, so there are some errors that need fixing.