dynamically mallocing memory based on path and command. Also created the ability to run things in the background