Fix any path handling

Fixes #880