Call the callback before recursing into a directory.
Also fix a few documentation ad code style issues.