Replaced the find commands with safer globbing.

1. Check if the directory exists.
2. Check if the directory is not empty.
3. Glob it's contents.