[fm] handle invalid chmod input (fixes #240)