Use tail -r instead of tac to eliminate coreutils dependency

[ticket: X]