Replaced shell script with escript.