fix pruneEmptyDirectories for modules that are single files
fix typo
check if module is a directory in workspace before calling pruneEmptyDirectories
Merge pull request #27 from hrzlgnm/master

[FIXED JENKINS-20317] Don't prune module if it's not a directory