Extract slug from path