1. Add explicit error when ActiveDocument is not available. This is useful when executing transformation by right clicking file in Soulution Explorer and selecting Run custom tool when no file is open.

2. Add better support for folder paths when names are repeated e.g. when project contains folder paths "Areas\Scripts\foo" and "Scripts\bar" and we are looking for "Scripts\bar" previously it would not find it because it would stop searching after "Areas\Scripts". Also add better error reporting when folder was not found.