made it work with files containing spaces in their name

Just adding apostrophies the os.system parameters so it works when you use it with files that have spaces in their names.
For instance:
bu test\ file\ with\ spaces
was resulting in the following
/bin/cp: extra operand ‘with’
before.