Fixed stacktrace in yml/json_encode. reflect_pull('file') now returns '/' instead of '\' regardless of platform.

Also started adding a few file path helper functions.