Fixed silly bug
Add a leading dot in relative paths (can be improved)
Catch potential exceptions that could possibly occur during substitute rule execution