Issues with float and directory not exsting

Running Python on Windows 7, I came across this problem, but could be fixed if the result of the ceiling operation is casted to an int.

TypeError: range() integer end argument expected, got float, line 54
```python
num_weeks = int(math.ceil(num_days / 7))
```
Finally, simply checking that the 'db' directory exists if not create it.