Tests windows

Some improvements for Windows. This might fix #411