add script to detect encoding on a file, was having issues with a file being passed to me