Help launch script find its home when symlinked

dirname is not enough when the launch script is linked into e.g.
/usr/local/bin/umongo.
Merge pull request #220 from benjamin9999/master

Help launch script find its home when symlinked