Add a function to get the rolename from a filepath