Directed flow and particle production in Au+Au collisions from experiment E877 at the AGS