pulseIn bug

Ha, now I recognize it you got the overflow bug!
I posted it here - Google Code Archive - Long-term storage for Google Code Project Hosting. - Solved in version 1.01 IIRC

OK explanation:

timeout = 10000000L 10 million

#define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (F_CPU / 1000L) )
#define microsecondsToClockCycles(a) ( ((a) * (F_CPU / 1000L)) / 1000L )

The first macro multiplies 10M * 1000 giving 10 000 000 000 which does not fit in a long ! overflow
The second similar.

Redefine these lines in wiring.h and it should work.

#define clockCyclesPerMicrosecond() ( F_CPU / 1000000L )
#define clockCyclesToMicroseconds(a) ( (a) / clockCyclesPerMicrosecond() )
#define microsecondsToClockCycles(a) ( (a) * clockCyclesPerMicrosecond() )
// http://arduino.cc/forum/index.php/topic,74813.0.html
// #define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (F_CPU / 1000L) )
// #define microsecondsToClockCycles(a) ( ((a) * (F_CPU / 1000L)) / 1000L )

This should solve it,
Succes