Fixes issue 796, can't ignore npm modules

After a quick look, I just emulated what the exclude does.