add null check for stat

when using the tags plugin, this line throws sometimes an uncaught exception because `stat` is null
fix https://github.com/docpad/docpad-plugin-tags/issues/3
Merge pull request #787 from timaschew/patch-1

add null check for stat https://github.com/docpad/docpad-plugin-tags/issues/3