OS X Lion - Serial Monitor breaks code - seems to reset rather than loop

PIRs are generally open collector. Are you using its output with a pull-up resistor?