def normalized_path(dir = Dir.pwd, options = {})
      rootdir = (FalkorLib::Git.init?(dir)) ? FalkorLib::Git.rootdir(dir) : dir
      path = dir
      path = Dir.pwd if dir == '.'
      path = File.join(Dir.pwd, dir) unless (dir =~ /^\// || (dir == '.'))
      if (options[:relative] || options[:relative_to])
        root = (options[:relative_to]) ? options[:relative_to] : rootdir
        relative_path_to_root = Pathname.new( File.realpath(path) ).relative_path_from Pathname.new(root)
        path = relative_path_to_root.to_s
      end
      path
    end
def normalized_path(dir = Dir.pwd, options = {})
      rootdir = (FalkorLib::Git.init?(dir)) ? FalkorLib::Git.rootdir(dir) : dir
      path = dir
      path = Dir.pwd if dir == '.'
      path = File.join(Dir.pwd, dir) unless (dir =~ /^\// || (dir == '.'))
      if (options[:relative] || options[:relative_to])
        root = (options[:relative_to]) ? options[:relative_to] : rootdir
        relative_path_to_root = Pathname.new( File.realpath(path) ).relative_path_from Pathname.new(root)
        path = relative_path_to_root.to_s
      end
      path
    end
normalize_path 
 Normalize a path and return the absolute path foreseen
 Ex: '.' return Dir.pwd
 Supported options:
  * :relative   [boolean] return relative path to the root dir