Designing a simple automatic USB switch
There are actually IC's available that do this sort of thing, essentially analog switches but designed specifically for USB 2.0 such as the FSUSB42MUX -- IC USB switch DPDT.  Only $1.70 in single quantities from Digi-Key.



They appear to only be available in SMT packages, such as 10-MSOP, but these can be soldered by hand easily enough, and even placed on a breakout board for prototyping.