Update ds1307_detect.py

Fixed some stupid bugs. Must test code before committing :)