Added generic setPath.m