Added get subdirectories function