Format path strings automatically using self attributes

Fixes #30