Modified ggplotcmd to read from file or stdin