Return exit code 1 for failures

Return exit code 1 if any error is encountered during build or usage.

Move creation of temporary directory from STI main down into the build
and usage functions.

Fixes #135
Merge pull request #148 from ncdc/sti-exit-code

STI - return exit code 1 for failures