added a deciated prepare script which builds the credentials file from environment variables