added source directory option and recursive directory expansion