Abstract the path calculation.
No idea why it broke.
Added tests for path calculatore.
Apidocs.
Merge pull request #263 from xi-project/storage-path-calculator

Storage path calculator