Pull from mdipierro/lms299 plus dbcal.py

This should be clean now. I pulled the latest version from mdipierro/lms299 (as of about 8:30 pm on 2014-10-23), and resolved all of the conflicts.

This also includes the dbcal.py file committed previously.
This project is flexing bash muscles I haven't used in a really long time.