Add "directory" to build dependencies.
Create log directory if missing.
Remove whitespace.