Fixes on file restore when bash metacharacters are in place

As well as single and double quotes are in the game.