refactor manage_script_name mountpoint selection (readability)