Fix #1: Segmentation fault on trailing slashes

Merged Alan Coopersmith requested to merge alanc/lndir:issue-1 into master

dodir may pass a NULL pointer for the **p argument so we verify the pointer is not NULL before dereferencing it.

Closes #1 (closed)

Merge request reports