Fixed as_logged_user for Windows (paths with spaces bug).