Bugfix: ``tempo2bpm()`` was broken.

It returned the wrong values for anything but 500000 microseconds per
beat (120 BPM). (Reported and fixed by Jorge Herrera, issue #21)

Also added tests for tempo2bpm() and bpm2tempo().