Fixed #28 for real this time
Fixed popen mode for windows and non-windows