new option --all
new option --print
--chdir takes multiple directory
fix newline handling bug