Fix Arduino DUE uploads on Linux

This fixes #31 and makes the uploader behave more closely like the Arduino IDE code.