base: better hscript+wscript detection