modified directory folder to return vector of directory objects