Instead of changing the whole course to another POSIX-permitted way
for consistency and uniformity I decide to completely ignore missing
regex fucntionality and focus on fixing bugs in what we have now,
too many small obstacles we have choicing other way, counting ports.
Corresponding libc changes are backed out in r302824.
glob() here too.
I try to keep the change minimal to not touch contribed code much.
I'll send it upstream when it will be merged to the main branches,
but we need this change now here.