FIX: OS-specific fixes and improvements. Console should now work fine on non-Windows platforms too.