Improved path handling for loading results
Fixed bug in angle calculation, when numerical errors make arccos fail