   # extension exists.
   extension: (path) ->
     return '' unless typeof path is 'string'
-    match = @base(path).match(/\.[^\.]+$/)
+    match = Path.basename(path).match(/\.[^\.]+$/)
     if match
       match[0]
     else

  # parent directory if the file is a directory. A terminal directory
  # separator is ignored.
  directory: (path) ->
    parentPath = path.replace(new RegExp("/#{@base(_.escapeRegExp(path))}\/?$"), '')
    return "" if path == parentPath
    parentPath



  isReadmePath: (path) ->
    extension = @extension(path)
    base = Path.basename(path, extension).toLowerCase()
    base is 'readme' and (extension is '' or @isMarkdownExtension(extension))

  readPlist: (path) ->
