[WIP] Rails 4 upgrade

Just some fixes that are included for the rails 4 update at https://github.com/crowbar/barclamp-crowbar/pull/1157 for getting feedback.
I'm replacing it now with ```dd if=/dev/urandom count=1 bs=18 2>/dev/null | base64 | tr -dc _A-Z-a-z-0-9```, i have changed the tr call to get only alphanum values without equal signs or something else.