fix for Windows (.exe extension and handling \r characters)