Documentation update.
Use a macro for booleans.
Silence warning by using string functions with explicit sizes.
Attempt to use the parent shell PWD if available. That should avoid symlinks to be resolved most of the time.