Sorts files in a directory into predefined directories according to their filetype.