Refactored the FileTree class into a library class and out of the files_spec.rb file.