Fix #1327: make sure to pass getModeFromPath() a filePath and not a uri
Created by: lguychard
getModeFromPath()
misbehaves when passed a URI instead of a filePath, and may wrongly return 'plaintext'
, notably when passed a URI to a document at the root of a repository (#1327 (closed))