Minor output and code formatting fixes.
Fixing bugs determining script location.