Comment correction.
Removed leftover test code.
Improved $DIRNAME output mechanism.

- Use a list of tuples instead of a dictionary to preserver order.
- Refactored code for superdir and subdir navigation into functions.
- Reworked directory shorthands to be more compact
Removed leftover global.