Removed debug variables.
Make symbol links relative to current document.
Ensure we create directories properly before using them.