business_logic.py: minor fixes and beatufications
business_logic.py: minor fixes and beatufications

- move opening of DB out of try-except-block. This has to work.
- fix docstring of lookup_dir
- use parameters instead of expanded strings in DB-executions

ya-induhvidual/python-libfs