Added optional deploy directory setting.