Fix #257 - Ensure paths exist before using them

- Also, fix assertions