absolute paths on dirname calls

This is minor, but I made all paths absolute to be consistent with the rest of the script in case people have strange aliases on dirname (which I've admittedly never heard of...)
Merge pull request #18 from deanmalmgren/patch-1

absolute paths on dirname calls