The geometry of entanglement witnesses and local detection of entanglement