Also, rail is very environmentally unfriendly for oil transport, both operationally and if there is a tanker car spill. With a pipeline, you have controls to immediately stop the flow between sections and mitigate damage. Rail car, you take your chances on where any incident might take place and I guess hope that there are sufficient HAZMAT services and access wherever it occurs for a quick cleanup. The pipeline would have some minimum of HAZMAT gear available pretty much along the whole length for fast response, and is the statistically safer transport method.
A lot of this was spelled out by the Canadian government, not exactly known internationally for their "anti-environmentalism". It just shows that the US enviros don't care about reducing the transportation pollution and increasing safety for the Canandian crude already being transported here. Agenda, yo.