Fixed the bug for getDirectories(). Now able to get any directory afaik