How can I avoid mixing up pins or mirroring pinouts on pin header connectors?
If you are not already doing so you should make sure to use a schematic capture tool that can then create a net list of the design connections. This can then be fed into the PCB layout tool to specify all the connections. This goes a long way to eliminating issues because:


It is far easier to get the connections down right on the schematic. In particular things are pictoral and much easier to check.
Working in schematic you can deal with connectors based entirely on the pin numbers. It can help to create schematic symbols that have a connection layout that logically maps to the physical connector. This helps with envisioning what hooks next to what.
Working in the pcb layout package concentrates at the start of creating footprints for all your parts, especially connectors, where you take great care to match the part drawing of the datasheet and assign the pin numbers properly. Also make sure the footprint includes markers or special features that indicate pin one position. DO not fall into the trap of using ready made library symbols that may have somebody elses ideas on how the pins are numbered.
It is extremely valuable to have in hand physical part samples, especially all the connectors and their mating parts. These help to visualize the orientations and pin configurations. They also offer a way to measure dimensions that may translate to silk screen outlines but are not specified in the data sheet. 
Done properly these steps should almost 100% eliminate having to define net hook up assignments in the layout tool.....which as you have seen can be error prone.