What is the best way to detect if a file has Unix style line endings () programatically in PHP and if file has Unix line endings convert the file to Windows style line endings ()?