kbdlayout: remove dependency on bash, use pcregrep