Added %A for variant directory

Also fixed a couple of file path calculation issues with variant directory searching