added dd function to handle variations of dd output in Linux