For good intonation you need properly aligned saddles and an accurately filed nut.
Steel strings guitars need compensated saddles in order to play in tune. Each strings has a small stiff portion at each end, and these dead ends don't move when the string is plucked. The treble E string has about 1/32" dead ends so it's saddle needs to be moved back 1/16". The bass E string saddle is back about 3/16" to 1/4", and the other strings fall in between. This is why steel string acoustic guitars have the saddle installed at an angle. For nylon strings the compensation is almost the same for each string, so the saddle can be straight.
The string slots in the nut need to be sloped so the strings break off the very front of the nut. They also need to be cut to the correct depth. High action at the nut means you basically have to bend the strings to reach the first few frets, making for sharp notes.
I'm a big fan of the Earvana compensated nut. On steel string guitars manufacturers position the nut so the high E string plays a true F at the first fret, but all the other strings play slightly sharp (the G being the worst). The Earvana nut has little shelves that move the contact points forward. Each string is individually compensated so the notes at the first fret are true F, A#,D#,G#, C, and F.
Actually for perfect intonation all the frets need to be compensated! Take a look at this company's efforts to improve the fret board: http://www.truetemperament.com/