A strange error, the following command works on Linux but not on Mac OS X with bwa-0.7.9a.

bwa aln ref.fasta -b0 se.bam > sai
...