allows edit of non-code file. fixed stdin issue
localize pattern
preserve template file line ending. removed default mode