Sets the current working directory for an application