Guard against empty doc fmtime field
Compute directory url using path manip, not filename substraction. Filename can be empty or inadequate
Merge pull request #31 from medoc92/master

Remove some wrong assumptions about the  filename and fmtime fields