Performance of an endcap prototype of the ATLAS accordion electromagnetic calorimeter