Alteration so you can call the scripts from anywhere

First thing that i noticed when checking out your setup is that the scripts only seemed to work if they were called from the proper location. This pull request should make the location not important anymore.

Basically it first changes the current dir to the directory of the script itself, before determining a BASEDIR and the SLUG.

All references to dirname $PWD are replaces to BASEDIR to avoid having to figure out where we are every time.