New functions for loading directories and related information.  Made getImagePath.m more robust