Fixed a warning in getline
Added encoding and saving operations
Fixed a bug in the input parsing

input and output files were swapped for the -o version