Added optional argument -baseurl to specify alternative to api base.