Support multi directory path

Closes #588