cygwin build broken.
fix listdir function for cygwin; in cygwin wordexp is not available, so use glob instead.