text: Title: [Core] Runtime env working_dir validation
  Body: ### What happened + What you expected to happen
  
  #51377
  
  We should do validation and fail early if working_dir contains invalid characters
  
  ### Versions / Dependencies
  
  master
  
  ### Reproduction script
  
  https://github.com/ray-project/ray/pull/51377
  
  ### Issue Severity
  
  None