Use path.delimiter instead of a custom switch

Just a small fix