if there is a TEST_ID in the ENV, upload the logs to the given test

Otherwise assume old cgi-bin interface
Merge pull request #14 from coolo/master

if there is a TEST_ID in the ENV, upload the logs to the given test