Automatically choose between tac and tail -r

tac is not available on mac, but tail is.