Creating directory before attempting to create file for detection.

Error solved:

IOError: [Errno 2] No such file or directory: '/var/tmp/thumbor/storage/ba/4ed3bf706f2efff35373ae03b52f850bd3a695.detectors.txt.e666f83dd1f94f96925b79f9ee272ebe'