Do not store script name and directory when unnecessary.