Initial commit of api_test.go
Fixed PGP regexp in api.go, and continued working on tests.
Added `go test` to travis-ci