Some sanity check in case if a directory is empty
Merge pull request #165 from mmelnyk/master

Sanity checks for slideshow and gallery handles