MinGW doesn't support RegEx test so replaced with case statement

Signed-off-by: Michael Welter <michael@cetoncorp.com>
The trailing slash on ln is needed in MinGW

Signed-off-by: Michael Welter <michael@cetoncorp.com>