How may I detect the name of the directory (or better yet the entire path) in which my shell script is run?
This is not as trivial as it looks like. Check out this question and this