Add tests.

Hi, I added some tests and refactored `main` to execute tests.

Due to resolve package path and directory path dynamically, test code of `TestConvertFunc1` is tricky a bit.

`testdata/func1_test.json` is generated based on the result of `gocov test testdata` (not documented).

However, `gocov test` (whole package gocov-xml) will fail with a message `gocov-xml.go:16: gocov redeclared as imported package name`
I think it caused by a bug of gocov: "Gocov fails if the target imports gocov itself" ... not reported yet.
A dirty workaround for it is simply delete the line from `gocov-xml.go`.
e.g. `sed -i -e '/"github.com\/axw\/gocov"/ d' gocov-xml.go`