Added the current path function using C hacks