Support for long paths and minor fixes