Added output options, fixed compatibility

Input files now work whether they end with a newline or not.