convert to unix and remove trailing whitespace
simplify reading options