Adjusted relative path resolution. Adjusted counting file links.