outputdir fix and per project settings if available

Hi,
This fixes bug #29 and resolves the issue of not having settings per project. I noticed there's already a branch addressing this issue but changes were reverted. Anyway here's a much simpler solution. Hope you merge it to master, for me at least it works.