fixed extension to work with both files and directories