Implementing unix commands in ruby