Functions.cs: new function IsDirectorySame
Use this function when comparing directory path for auto fit.