Hey some guy,

Regarding your surprise about pwd: I don't know the actual history, your assumption of a minimal prompt might be true. However, pwd is also very handy for scripting. Bear in mind that scripts don't have a prompt. ;-)

Pretend you are in directory A, and the script is in directory B. So in the terminal you enter B/script to run it. Now within that script, the variable $0 contains that calling string, i.e. B/script. But if you call pwd in that script, it returns A(!). So if you use ./ as path for your dump files, that means that the file will be created at your pwd.

I often write quick-n-dirty scripts for one-off tasks and they tend to use relative paths for simplicity. In such cases I use the following line at the start of the script:
cd "$(dirname "$0")"
This changes the script's current directory to where it is actually located. The quotes are there to handle spaces in path names and they are a good habit to acquire. (I'm kind of a language purist and don't like filenames riddled with underscores. I find them hard to read and hard to work with.)