Fix digitalPulse with not a number
            Make digitalPulse(... 0) wait until the last pulse is complete
Contrib by jdomeij@gmail.com - don't use sed, so it can compile under mingw
Contrib by jdomeij@gmail.com - changes to allow a native Win32 build