fp/m/directories: Added directories module and moved recursion method to it