Error handling for require-tree

fixes #2507

- ideally we would create an apps directory if one isn't present, but we can deal with that in later versions
Merge pull request #2508 from ErisDS/issue-2507

Error handling for require-tree