Check that source folders exist before using them.

Fixes #178.
Merge pull request #179 from palantir/fix-178

Check that source folders exist before using them.