realpath / locale

add realpath bash function for portability
set locale for tr so osx doesn't complain