remove leading and trailing directory separators from mappings