Modified api.go - Added some basic error checking and command line flag handling

	modified:   api.go
updated spacing
Merge branch 'master' of defra:/houst0n/vcd

Conflicts:
	api.go
Merge pull request #2 from vamegh/master

error checking and flag checking added