[PATCH] Make CDPATH handling portable, accept entries not matching "/$".