Check for a dirty working directory correctly.

Revert "Apply a strict checking of the version control tag"

This reverts commit 9482c4fc631b8252f9b10ff2a7335c8395b434b0.
Make sure the DERIVED_FILES_DIR exists before we write to it.

Revert "Fix the csreq path"

This reverts commit 828b5d6247ae5acaf543d164009d434876edd5c5.
Use the full path to the app.
Merge pull request #306 from dak180/topic/build-system

Do some fixups for Release-for-upload.sh
Be more clear about different error conditions.
Merge pull request #311 from dak180/topic/build-system

Be more clear about different error conditions.