Simplify 'path -> module name' convertion