Use current working directory instead of magic string.
Simplify pretty printing algorithm.