Remove trailing slash, causes issues with directory creation