Fixed the header to support non-Windows OSes and removed unnecessary newlines on output lines.