Serial Port programming in Linux using C – Working code