Gracefully handle nonexistent directories.