Correct interpreter, fix gofmt execution.

Fixes:
* Script used bash syntax, e.g: $(...), not plain bourne shell (sh).
  Changing the interpreter in line with this.
* The line output=gofmt -w "$file" interpretted "output=gofmt" as
  setting an environment variable, and -w as a command. This change
  corrects to what was intended.
Switch back to bourne shell for portability.
Change to bourne shell syntax in fmt-check
Merge pull request #1 from huin/patch-1

Correct interpreter, fix gofmt execution.