update regexp for new version of npm

also, use quotemeta where necessary