Use readlink -f to determine source directory in scripts/prepare-commit.sh

This makes it possible to use prepare-commit.sh as a git pre-commit hook by just symlinking `prepare-commit.sh`:

    cd .git/hooks
    ln -s ../../scripts/prepare-commit.sh pre-commit

(Without readlink, `dirname $0` returns the `hooks` directory instead of the `scripts` directory).