Display version at start

Troubleshooting is easier if the version of the initrepo script
gets displayed at the beginning of the output. This makes it easier
to compare the output of a person that has problems with the output
on the own machine.

This change also fixes a problem with detecting a dirty working
directory: functions.sh has to be included before calling a function
included in it.

Change-Id: I8a81d698e73a6ee34bd7bb97809ed7336bf4b47f